<script lang="ts" context="module">
  import type { Column } from "./conf";
</script>
<script lang="ts">
  import { createEventDispatcher } from 'svelte';
  export let col: Column;
  export let checked = false;
  const dispatch = createEventDispatcher();
  function handleChange () {
    dispatch("update-cell", {
      cellKey: col.key,
      val: checked,
    });
  }
</script>
<div class="flex items-center justify-center">
  <input type="checkbox" class="rounded-sm" bind:checked on:change={handleChange}>
</div>